<template>
  <view class="page_content">
    <view class="menu_item" v-for="(item,index) in dataList" :key="index" @tap="goTo(item)">
      <image class="item_icon" :src='item.image'></image>
      <view class="item_name">{{item.value}}</view>
      <view class='at-icon at-icon-chevron-right item_right'></view>
    </view>
  </view>
</template>

<script>
import './index.scss'
import Taro from '@tarojs/taro'
export default {
  name: 'user',
  data(){
    return{
      dataList:[
        {
          image: 'https://img20.360buyimg.com/jdphoto/s72x72_jfs/t15151/308/1012305375/2300/536ee6ef/5a411466N040a074b.png',
          value: '交班',
          path: "/pages/shiftExchange/add"
        },
        {
          image: 'https://img12.360buyimg.com/jdphoto/s72x72_jfs/t6160/14/2008729947/2754/7d512a86/595c3aeeNa89ddf71.png',
          value: '交班记录',
          path: "/pages/shiftExchange/list"
        },
      ],
    }
  },
  methods: {
    changeContent(a){
      console.log("数据", a);
    },
    goTo(item){
      Taro.setStorageSync('ExdetailData',"");
      // if(item.path == "/pages/shiftExchange/add"){
      // }
      console.log("数据", item.path)
      Taro.navigateTo({
        url: item.path
      })
    },
  }
}

</script>
